using System;
using System.Xml.Serialization;

namespace Wulong.Phone.Dianping.Utils
{
    [XmlRoot("image")]
    public class BingBackgroundItem
    {
        [XmlElement("startdate")]
        public string StartDate { get; set; }

        [XmlElement("enddate")]
        public string EndDate { get; set; }

        [XmlElement("url")]
        public string Url { get; set; }

        public Uri ImageUrl
        {
            get{return new Uri("http://www.bing.com" + Url);}
        }

        public string FileName
        {
            get { return Url.Substring(Url.LastIndexOf('/')+1); }
        }
    }
}
